
import React from 'react';
import PropTypes from 'prop-types';

import {
   View,
   Button,
   TouchableOpacity,
   StatusBar,
} from 'react-native';

import styles from './styles';

export default class main extends React.Component {
  static propTypes = {
    navigation: PropTypes.any.isRequired,
  }
  static navigationOptions = {
    title: '工具集',
    text: '',
  };

  render() {
    return (
    <View style={styles.container}>
      <StatusBar
        hidden={false}
        backgroundColor="grey"
        translucent={false}
        barStyle={'default'}
        showHideTransition={'fade'}
      />
      <View style={styles.inner}>
        <Button
          style={styles.button}
          title="视频搜索"
          onPress={() => this.props.navigation.navigate('Movies')}
        />
        <TouchableOpacity>
          <Button
            style={styles.button}
            pointerEvents={'none'}
            title="Flex布局"
            onPress={() => this.props.navigation.navigate('MyFlex')}
          />
        </TouchableOpacity>
        <Button
          style={styles.button}
          title="Switch例子"
          onPress={() => this.props.navigation.navigate('MySwitch')}
        />
        <Button
          style={styles.button}
          title="模态窗口"
          onPress={() => this.props.navigation.navigate('WaitingModal')}
        />
        <Button
          style={styles.button}
          title="手势操作"
          onPress={() => this.props.navigation.navigate('Gesture')}
        />
        <Button
          style={styles.button}
          title="地理位置"
          onPress={() => this.props.navigation.navigate('GeoLocation')}
        />
        <Button
          style={styles.button}
          title="图库操作"
          onPress={() => this.props.navigation.navigate('Images')}
        />
        <Button
          style={styles.button}
          title="暂无"
          onPress={() => this.props.navigation.navigate('GeoLocation')}
        />
      </View>
    </View>
    );
  }
}
